<%-- 
    Document   : delete
    Created on : Jun 22, 2012, 5:47:43 AM
    Author     : karuna
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.sql.*,java.io.*" %>
  <%
          Class.forName("oracle.jdbc.driver.OracleDriver");

         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","pac","mca"); 

       
         
         String message=request.getParameter("message");
         String college_uname=request.getParameter("college_uname");
         String college_pwd=request.getParameter("college_pwd");
    Statement st = con.createStatement();
  String sql = "DELETE FROM message WHERE message ='"+message+"'";
  int delete = st.executeUpdate(sql);
  


          
            //PreparedStatement prest = con.prepareStatement("DELETE FROM message where message='"+message+"'");
           
           // int del = prest.executeUpdate();
                   
   
  %>

   
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body bgcolor="#99AAE1">
        <br><table width="50%" height="70%" bgcolor="gray">
        <tr><td> <center><br><br><h4>The selected record is deleted</h4></center></td></tr>
        <tr><td><center><form action="cls" method="post">
            <input type="hidden" name="college_uname" value="<%=college_uname%>">
            <input type="hidden" name="college_pwd" value="<%=college_pwd%>">
        <input type="submit" value="back"/>
</form>
</center></td></tr>
    </body>
</html>


